package com.alibaba;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;

/**
 * 宠物之家后端项目启动类
 */
@SpringBootApplication
@MapperScan("com.alibaba.*.mapper") // 扫描mapper包，生成mapper接口的代理对象
//加载Listener - 本来监听器只要服务器一启动就会执行，但是SpringBoot项目中是通过启动类开启服务的，所以要加这个注解去加载listener，listener才会起作用
@ServletComponentScan(value = {"com.alibaba.basic.listener"})
public class PetHomeApplication {
    public static void main(String[] args) {
        SpringApplication.run(PetHomeApplication.class, args);
    }
}
